﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ManticLabs.Data;

namespace ManticLabs.Common
{
    public class General
    {
        public static string ConnStringListenerDB = "";
        public static string ConnStringSharedDB = "";
        public static int QueryTimeOut = 120;
        public static string LogPath { get {return "D:\\ManticLabsLog\\"; } }
        public static string LogLevel = "";



        public static DataAccessOleDB GetDataAccess(DBMSID dbmsId)
        {
            //if (dbmsId==DBMSID.Access)
            //{
                return new DataAccessOleDB();
            //}
            //else if (dbmsId == DBMSID.MsSQL2000 || dbmsId == DBMSID.MsSQL2005 || dbmsId == DBMSID.MsSQL2008 || dbmsId == DBMSID.MsSQL2012)
            //{
            //    return new DataAccessMSSQL(dbmsId);
            //}
            //else if (dbmsId==DBMSID.MySQL)
            //{
            //    return new DataAccessSQLLite();
            //}
            //else
            //{
            //    return new DataAccessOleDB();
            //}
 
            //if (ConfigurationManager.AppSettings["DBMSName"].ToString() == "Access")
            //{
            //    return new DataAccessOleDB(dbID);
            //}
            //else if (ConfigurationManager.AppSettings["DBMSName"].ToString() == "SQL")
            //{
            //    return new DataAccessMSSQL(dbID);
            //}
            //else if (ConfigurationManager.AppSettings["DBMSName"].ToString() == "SQLite")
            //{
            //    return new DataAccessSQLLite(dbID);
            //}
            //else
            //{
            //    return new DataAccessOleDB(dbID);
            //}
        }

    }


}
